/* 
 * File:   File.cpp
 * Author: Imre Tabur
 * 
 */
#include "File.h"

using namespace CloudyStorage;

File::File() : validator(0), storage(0), connector(0) {
}

File::~File() {
    delete this->validator;
}

ValidationResult File::validate() {
    return this->validator->validate(*this);
}

void File::setConnector(IConnector *conn) {
    if (conn == 0) {
        return;
    }
    this->connector = conn;
    this->connector->file = this;
}

IConnector *File::getConnector() {
    return this->connector;
}
